package com.coderman.domainservice.blogtopic.infrast.mq.provider;

import com.coderman.domainservice.blogtopic.infrast.mq.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Description:
 * date: 2021/3/30
 *
 * @author shenshuai
 * @version 1.0.0
 * @since JDK 1.8
 */
@Service
public class MqSendService {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    /**
     * 发送消息
     * @param mqTopic
     * @param payload
     * @return
     */
    public String send(String mqTopic,String payload){
        return rocketMQTemplate.syncSend(mqTopic,payload);
    }
}
